<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="base :: header (title='物料替代')" />
<link th:href="@{css/basemessage.css}" rel="stylesheet" />
<link th:href="@{css/BasicInfo/materielReplace.css}" rel="stylesheet" />
<link th:href="@{css/style1.css}" rel="stylesheet" />
<link th:href="@{css/red.css}" rel="stylesheet" />
<body class="blank_bg">
	<div class="main-content blank_bg">
		<div>
			<div>
				<div class="row" style="margin: 0">
					<div>
						<div class="col-sm-12 col-md-12" style="margin-bottom: 10px;margin-left: 6%;">
							<div style="display: inline-block;" class="col-sm-6 col-md-6">
								<div>
									<div style="float:left">
										<span class="code">主物料长代码：</span>
										<input id="id_main" name="id_main" class="form-control clean_main" autocomplete="off" style="display: inline-block;width: 170px;margin-right: 10px;" onkeypress="key(event,this.id)"/> 
									</div>
									<div style="float:left">
										<input type="button" style="font-size: 17px;" class="btn btn-default" id="main" value="查询" onClick="query(this.id)"/>
										<input type="button" style="font-size: 17px;" class="btn btn-default" id="reset_main" value="重置" onClick="reset(this.id)"/>
									</div>
									<div style="clear:both"></div>
								</div>
								<div style="margin-top: 15px;">
									<div class="infoClass">
										<span class="code">物料代码：</span>
										<input id="fItemNumber_main" name="fItemNumber" class="form-control clean_main" readonly="readonly"/> 
									</div>
									<div class="infoClass">
										<span class="code">物料名称：</span>
										<input id="fItemName_main" name="fItemName" class="form-control clean_main" readonly="readonly"/> 
									</div>
									<div class="infoClass">
										<span class="code">规格型号：</span>
										<input id="fItemFmodel_main" name="fItemFmodel" class="form-control clean_main" readonly="readonly"/> 
									</div>
								</div>
							</div>
							<div style="display: inline-block;" class="col-sm-6 col-md-6">
								<div style="float:left">
									<span class="code">替代物料长代码：</span>
									<input id="id_second" name="id_second" class="form-control clean_second" autocomplete="off" style="display: inline-block;width: 150px;margin-right: 10px;" onkeypress="key(event,this.id)"/> 
								</div>
								<div style="float:left">
									<input type="button" style="font-size: 17px;" class="btn btn-default" id="second" value="查询" onClick="query(this.id)"/>
									<input type="button" style="font-size: 17px;" class="btn btn-default" id="reset_second" value="重置" onClick="reset(this.id)"/>
								</div>
								<div style="clear:both"></div>
								<div style="margin-top: 15px;">
									<div class="infoClass">
										<span class="code">物料代码：</span>
										<input id="fItemNumber_second" name="fSubstituteItemNumber" class="form-control clean_second" readonly="readonly"/> 
									</div>
									<div class="infoClass">
										<span class="code">物料名称：</span>
										<input id="fItemName_second" name="fSubstituteItemName" class="form-control clean_second" readonly="readonly"/> 
									</div>
									<div class="infoClass">
										<span class="code">规格型号：</span>
										<input id="fItemFmodel_second" name="fSubstituteItemFmodel" class="form-control clean_second" readonly="readonly"/> 
									</div>
								</div>
							</div>
							<div style="clear:both"></div>
						</div>
						<div style="text-align: center;margin: 10px 0;">
							<input type="button" style="font-size: 17px;" class="btn btn-default" id="generate" value="生成物料替代关系"/>
						</div>
					</div>
				</div>
				<div class="" style="background-color: #5bc0de; height: 30px; line-height: 30px;margin: 0 20px;">
					<span style="color: #fff;margin-left: 10px;">物料替代列表</span>
				</div>
				<div style="margin: 0 20px;" id="divBody">
					<table id="listTable" class="table table-hover "></table>
				</div>
				<!-- 修改关系模态框 start -->
				<div class="modal fade " id="modifyModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
					<div class="modal-dialog" style="width: 450px; height: 220px;">
						<div class="modal-content" style="width: auto;">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
								<h4 class="modal-title" id="titleModal">修改工序替代关系</h4>
							</div>
							<div class="modal-body" style="height: auto; padding: 10px;">
								<form id="modifyForm" class="form-group">
									<div style="display: inline-block; overflow: hidden;" id="info">
										<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table short-table" style="width: 400px !important; margin: 5px 15px;" id="dispatchingTable">
											<tr>
												<td style="width: 110px;"><span>主物料代码：</span></td>
												<td><input type="text" id="modifyfItemNumber" name="fItemNumber" class="clean_c form-control" readonly="readonly" /></td>
											</tr>
											<tr>
												<td style="width: 110px;"><span>主物料名称：</span></td>
												<td><input type="text" id="modifyfItemName" name="fItemName" class="clean_c form-control" readonly="readonly" /></td>
											</tr>
											<tr>
												<td style="width: 110px;"><span>主物料规格型号：</span></td>
												<td><input type="text" id="modifyfItemFmodel" name="fItemFmodel" class="clean_c form-control" readonly="readonly" /></td>
											</tr>
											<tr>
												<td style="width: 110px;"><span class="requiredCss">*</span><span>替代物料代码：</span></td>
												<td><input type="text" id="modifyfSubstituteItemNumber" name="fSubstituteItemNumber" class="clean_c form-control bj_color" autocomplete="off"/></td>
											</tr>
											<tr>
												<td style="width: 110px;"><span>替代物料名称：</span></td>
												<td><input type="text" id="modifyfSubstituteItemName" name="fSubstituteItemName" class="clean_c form-control" readonly="readonly" /></td>
											</tr>
											<tr>
												<td style="width: 110px;"><span>替代物料规格型号：</span></td>
												<td>
													<input type="text" id="modifyfSubstituteItemFmodel" name="fSubstituteItemFmodel" class="clean_c form-control" readonly="readonly" />
													<input type="hidden" id="modifyfID" name="fID" class="clean_c form-control" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td colspan="4" style="text-align: left;"><span class="requiredCss" style="margin-left: 35px;">注：带*为必填字段。重新输入替代物料代码后，</span></td>
											</tr>
											<tr>
												<td colspan="4" style="text-align: left;"><span class="requiredCss" style="margin-left: 35px;">按回车才会出现替代物料名称和替代物料规格型号</span></td>
											</tr>
										</table>
										<div style="">
											<div style="text-align: center; margin-top: 10px;">
												<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
												<button type="button" class="btn btn-default" id="cancel">取消</button>
											</div>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!-- 修改关系模态框 end -->
			</div>
		</div>
	</div>
	<div th:include="base :: bottom" />
	<div th:include="base :: others" />
	<script th:src="@{js/BasicInfo/materielReplace.js}"></script>
</body>
</html>